1. Field of the Invention
The present invention relates generally to an improved data processing system, and in particular, to a computer implemented method for profiling an application's computing resource usage in a data processing system. Still more particularly, the present invention relates to a computer implemented method, system, and computer usable program code for a smart profiler that is capable of tuning its own intrusion into the data processing system's operation.
2. Description of the Related Art
As software applications execute in a data processing system, they consume computing resources. For example, a software application uses processor cycles to perform computations, input/output (I/O), and other manipulation of data. Users often have to measure the performance of a software application as pertains to the software application's usage of the computing resources.
Such measurements are useful in learning if a certain portion of the application is performing inefficiently. For example, a function call in a software application may result in consuming a disproportionate amount of processor time. Users can modify or alter the application based on such measurements so that the application performs more efficiently than before.
Users use a software tool called a profiler for performing these measurements. A profiler is a software application that can monitor and report on another application's usage of computing resources.
Different types of profilers measure the performance of applications in different ways. For example, an interrupt based profiler relies on interrupts to capture representative activities of the data processing system under test. In other words, these profilers capture the interrupts generated by the data processing system and analyze those interrupts to perform the measurements.
Typically, a user using an interrupt based profiler can trigger the interrupts in one of two ways. First, the user can trigger interrupts based on a predetermined time interval using a timer. Users now disfavor this method of triggering interrupts over the alternative.
Alternatively, the user can use event based profiling. Event based profiling uses specific events to trigger interrupts as opposed to the passage of a fixed amount of time. Event based interrupts generally yield broader profiling results as compared to timer based interrupts. The events, including cycle events, may be caused by the application that may be executing and therefore an interrupt based on those events may provide information related to the application.
Event based profiling uses the performance monitor units (PMU) included in most modern processors that can trigger interrupts to measure various hardware level events. Some examples of these events are processor cycles elapsed, instructions retired, translation lookaside buffer misses, level 2 cache misses, level 3 cache misses, remote memory accesses, and disk I/O.